home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib8
/
v_10_09
/
1009102a
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-11-01
|
302 b
|
27 lines
Listing 3
#include <iostream.h>
#include <string.h>
class String
{
...
public:
String(const String &s);
...
private:
size_t len;
char *str;
};
String::String(const String &s)
{
len = s.len;
str = new char[len + 1];
strcpy(str, s.str);
}
----------